import store from '@/store'

/**
 * 权限检查
 *
 * @param {String} value
 * @returns {Boolean}
 * @example see @/views/permission/directive.vue
 */
export default function can(value) {
  const permissions = store.getters && store.getters.permissions

  return permissions.indexOf(value) >= 0
}
